# -*-coding:utf-8-*-
import sys
from sqlalchemy import Column, String, Text
from YX_crawler.props.sql_connect import Base

reload(sys)

sys.setdefaultencoding('utf-8')


class yx_item(Base):
    __tablename__ = 'tb_yx_item'

    item_id = Column(int, primary_key=True)
    item_title = Column(String(256))
    item_des = Column(String(1024))
    item_price = Column(float)
    item_good_rate = Column(float)
    item_comment1 = Column(Text)
    item_comment2 = Column(Text)
    item_comment3 = Column(Text)
    item_comment4 = Column(Text)
    item_comment5 = Column(Text)

    item_img1 = Column(String(2048))
    item_img2 = Column(String(2048))
    item_img3 = Column(String(2048))
    item_img4 = Column(String(2048))
    item_img5 = Column(String(2048))

    def __init__(self, itemID):
        self.item_id = itemID

    # toString()
    def __repr__(self):
        return '**ITEM***' + self.item_title
